package com.button.boot.exception.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.button.boot.exception.model.ExceptionModel;

@RestController
public class ExceptionController {
    
    @GetMapping(value = "e1")
    public Object e1() {
        throw new ExceptionModel("500", "接口异常了.");
    }

    @GetMapping(value = "e2")
    public Object e2() {
        int a = 1/0;
        return a;
    }
}
